package text111;

public class Solution5 {
	 public int missingNumber(int[] nums) {
		 	int target = 0;
		 	int i = 0;
		 	/*for (int i = 0; i < nums.length; i++) {
				if (nums[i]!=i) {
					target = i;
					System.out.println(i);
				}else {
					target = i++;
				}
			}
		 	return target;*/
		 	while(nums[i]==i) {
		 		i++;
		 		if (i>=nums.length) {
					break;
				}
		 	}
		 	return i;
	    }
}
